<%@ page contentType="text/html; charset=UTF-8" language="java" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<html>
<head>
    <title>Title</title>
    <%@include file="../jsp/head.jsp" %>
    <!-- ztree -->
    <link rel="stylesheet" href="${ctx}/lib/ztree/zTreeStyle/zTreeStyle.css" type="text/css">
    <script type="text/javascript" src="${ctx}/lib/ztree/jquery.ztree.core.min.js"></script>
    <script type="text/javascript" src="${ctx}/lib/ztree/jquery.ztree.excheck.min.js"></script>
    <script type="text/javascript" src="${ctx}/js/userList.js"></script>
</head>
<body>
<div id="toolbar" style="display: none;">
    <!-- 增删改按钮 -->
    <div class="toolbar-button" style="padding: 10px 10px 15px;">
        <shiro:hasPermission name="yonghuguanli:xinzeng">
            <a id="add" class="easyui-linkbutton" iconCls="icon-add" plain="true">新增</a>
        </shiro:hasPermission>
        <shiro:hasPermission name="yonghuguanli:xiugai">
            <a id="update" class="easyui-linkbutton" iconCls="icon-edit" plain="true">修改</a>
        </shiro:hasPermission>
        <shiro:hasPermission name="yonghuguanli:shanchu">
            <a id="delete" class="easyui-linkbutton" iconCls="icon-delete" plain="true">删除</a>
        </shiro:hasPermission>
        <shiro:hasPermission name="yonghuguanli:yonghujiaoseshezhi">
            <a id="userSet" class="easyui-linkbutton" iconCls="icon-set-role" plain="true">用户角色设置</a>
        </shiro:hasPermission>
    </div>
</div>
<div id="dialog-user-edit" class="easyui-dialog"
     data-options="closed:true,modal:true" style="width:330px;padding: 20px;">
    <form id="users-form">
        <input type="hidden" name="id">
        <div style="margin-bottom:20px">
            <input class="easyui-textbox" id="uname" name="uname"
                   data-options="label:'用户名',labelAlign:'right',labelWidth:80,required:true,width:250">
        </div>
        <div style="margin-bottom:20px">
            <input class="easyui-textbox" id="rname" name="rname"
                   data-options="label:'姓名',labelAlign:'right',labelWidth:80,required:true,width:250">
        </div>
        <div style="margin-bottom:20px">
            <input class="easyui-passwordbox" id="pword" name="pword"
                   data-options="label:'密码',labelAlign:'right',labelWidth:80,required:true,width:250">
        </div>
        <div style="margin-bottom:20px">
            <input class="easyui-radiobutton" name="userType" value="1"
                   data-options="label:'超级管理员',labelAlign:'right',labelWidth:120">
            <input class="easyui-radiobutton" name="userType" value="0"
                   data-options="label:'普通用户',labelAlign:'right',labelWidth:80">
        </div>
    </form>
</div>
<table id="table-users"></table>
<div id="dialog-user-role-tree" class="easyui-dialog"
     data-options="modal:true,width:240,height:520,closed:true" style="padding: 10px;">
    <ul id="role-tree" class="ztree"></ul>
</div>
</body>
</html>
